<?php

namespace app\gears\validate;

use think\Validate;

class GearValidate extends Validate
{
    protected $rule = [
        'name' => 'require',
        'id'   =>  'require'
    ];

    protected $message = [
        'name.require' => '名称不能为空',
        'id.require' => '档位id不能为空'
    ];
    protected $scene = [
        'add'  => ['name'],
        'edit'  => ['name','id'],
    ];
}